function validate(formId, msg){
	var eles = jQuery("#"+formId+" .requireInput");
	for(var i=0;i < eles.length;i++){
		if(!eles[i].disabled && trim(eles[i].value)==''){
			alert(msg);
			eles[i].focus();
			return false;
		}
	}
	return true;
}

function validateChk(className,message){
	if(jQuery('.'+className+':checked').length==0){
		alert(message);
		return false;
	}
	return true;
}

/*validateCombo by kiattikul.s 15-09-2012*/
function validateCombo(formId,msg){
	var eles = jQuery("#"+formId+" .requireCombo");
	for(var i=0;i < eles.length;i++){
		if(!eles[i].disabled && trim(eles[i].value)=='' || trim(eles[i].value)== 0){
			var message = msg;
			alert(message);
			eles[i].focus();
			return false;
		}
	}
	return true;
}

function notPaste(){
	jQuery('.notPaste').bind('paste', null, function(e) {
	    if(!e.keyCode){
	      return false;
	    }
	});
}


function DateControl_Bak(msg){
	//jQuery(".input_date").mask("99/99/9999");
	jQuery(".input_date").keypress(
			function (e){
				 var code = (e.keyCode ? e.keyCode : e.which);
				 if((code==32) ||(code == 46) || (code == 8)||(code == 17) ||  (code == 35)||(code == 36)||(code == 9) || (code == 37)||(code == 39)){
					 return true;
				 }
				 if((jQuery(this).val().length<10 && (code >= 48 && code <= 57))){

					 if(jQuery(this).val().length==2 || jQuery(this).val().length==5){

						 jQuery(this).val(jQuery(this).val()+"/");
					 }
					 return true;
				 }else{
					 return false;
				 }

			}
	);
	jQuery(".input_date").blur(
			function (){
				if(trim(this.value)!='' &&!isDate(this.value)){
					alert(msg);

					/* clear value*/
					jQuery(this).attr("value",'');

					/* �� �ѭ�� ��� focus �  fire fox ��ѧ�ҡ��� alert */
					this.focus();

				}
			}
	);

}